<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@page import="org.jpass.dc.common.bean.Page" %>
<%
	Page initPage = (Page)request.getAttribute("page");
	int pageIndex = (int)initPage.getPageIndex(); //当前页
	int pageSize = (int)initPage.getPageSize(); //每页记录数
	int totalCount = (int)initPage.getTotalCount(); //总记录数
	int pageCount = (int)initPage.getPageCount(); //总页数
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PaaS平台IDE--用户管理</title>
<link href="/daycodefront/backstage/css/userManage.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/daycodefront/backstage/javascript/userManage.js"></script>
<script type="text/javascript">
	function initPageInfo(){
		var current = window.parent.document.getElementById("current");
		var pageCount = window.parent.document.getElementById("pageCount");
		var totalCount = window.parent.document.getElementById("totalCount");
			pageCount.innerHTML = <%=pageCount%>
			totalCount.innerHTML = <%=totalCount%>
		var pageIndex = <%=pageIndex%>
		var pageCount = <%=pageCount%>
			for(var i=0;i<pageCount;i++){
				current.options[i] = new Option(i+1,i+1);
			}
			current.value = pageIndex;
		//var initpage = window.parent.document.getElementById("initpage");
		//initpage.style.display="none";
		
	}
</script>
</head>
<body onload="initPageInfo();">
	<div class="content">
	<table width="100%" border="0">
		<tr class="title">
			<td width="3%" style="text-align:center;"><input id="allSelected" type="checkbox" onclick="allSelected();"/></td>
			<td width="10%"><span>用户名</span></td>
			<td width="5%"><span>性别</span></td>
			<td width="17%"><span>注册邮箱</span></td>
			<td width="10%"><span>积分</span></td>
			<td width="10%"><span>用户组</span></td>
			<td width="5%"><span>是否会员</span></td>
			<td width="5%"><span>是否在线</span></td>
			<td width="5%"><span>登录次数</span></td>
			<td width="13%"><span>上次登录时间</span></td>
			<td width="15%"><span>操作</span></td>
		</tr>
		<s:iterator value="#request.list" var="user" status="index">
			<tr class="record">
				<td class="number" style="text-align:center;">
					<input type="checkbox" name="recordIds" value="<s:property value="#user.id"/>"/>
				</td>
				<td><s:property value="#user.username"/></td>
				<td style="text-align:center;"><s:property value="#user.sex==null?'－':#user.sex"/></td>
				<td><s:property value="#user.email"/></td>
				<td><s:property value="#user.point"/></td>
				<td><s:property value="#user.groupName"/></td>
				<td style="text-align:center;"><s:property value="#user.isMember==0?'否':'是'"/></td>
				<td style="text-align:center;"><s:property value="#user.isOnline==0?'否':'是'"/></td>
				<td><s:property value="#user.loginTimes"/></td>
				<td style="text-align:center;"><s:date format="yyyy-MM-dd HH:mm:ss" name="#user.lastSignTime" /></td>
				<td style="text-align:center;">
					<input type="hidden"/>
					<a onclick="resetPass('<s:property value="#user.id"/>');">重置密码</a>
					<a onclick="updateUser('<s:property value="#user.id"/>');">修改</a>
					<a onclick="deleteUser('<s:property value="#user.id"/>');">删除</a>
				</td>
			</tr>
		</s:iterator>
	</table>
	</div>
</body>
</html>